home *** CD-ROM | disk | FTP | other *** search
- Path: serra.unipi.it!vanni
- From: vanni@fox.ino.it (Vanni Guarneri)
- Newsgroups: comp.lang.c
- Subject: Function with values from a table
- Date: 5 Mar 1996 09:34:48 GMT
- Organization: Istituto Nazionale di Ottica-Florence-ITALY
- Message-ID: <4hh1ro$19i8@serra.unipi.it>
- NNTP-Posting-Host: a730.ino.it
- X-Newsreader: TIN [version 1.2 PL2]
-
- Hi,
-
- I have to use a routine of "numerical recipies" in which an external function
- g is required.
-
- My problems are:
-
- the values of g are known by means of a table (i.e. it not exist an analytical
- form of it) being it defined by experimental data.
-
- The routine I have to use is so defined:
-
- void fred2(... ... ... float (*g)(float))
-
- So I have to use a pointer to a function whose values are taken by a table and it
- has to be called by means of a pointer.
-
- What could I do ? (I cannot change the declaration of the routine)
- BTW I have a file with the values of the function sampled in couples
- X, Y).
-
- Any help will be very appreciated
-
-
- Best regards
-
- Vanni Guarnieri
-
- *******************************************
- * Vanni Guarnieri *
- * Istituto Nazionale di Ottica *
- * Largo Enrico Fermi, 6 *
- * 50125 Firenze *
- * ITALIA *
- * Phone: (39)55-23.081 *
- * Fax: (39)55-233.77.55 *
- *******************************************
-